package com.itheima05;

/**
 * @author Xiao
 * @date 2021/7/9
 */
public class Student extends Person {
    /**
     *      老师和学生(案例)
     *          学生类（子类）
     */
    private String sid;
    public void study () {
        System.out.println(super.getAge() + "岁的学生" + super.getNmae() + "(学号：" + this.sid + ")在学习。");
    }

    public Student() {
    }

    public Student (String name,int age, String sid) {
        super (name,age);
        this.sid = sid;
    }

    public Student(String sid) {
        this.sid = sid;
    }

    public Student(String nmae, int age) {

        super(nmae, age);
    }

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

}
